#include "dbtabclassifierproduct.h"
const QLatin1String DBTabClassifierProduct::TAB_NAME = QLatin1String("classProduct");
const char* DBTabClassifierProduct::_NAME = "name";
const char* DBTabClassifierProduct::_BARCODE = "barcode";
const char* DBTabClassifierProduct::_R1_LOW = "r1_low";
const char* DBTabClassifierProduct::_R1_HI = "r1_hi";
const char* DBTabClassifierProduct::_R2_LOW = "r2_low";
const char* DBTabClassifierProduct::_R2_HI = "r2_hi";
const char* DBTabClassifierProduct::_R3_LOW = "r3_low";
const char* DBTabClassifierProduct::_R3_HI = "r3_hi";
const char* DBTabClassifierProduct::_R4_LOW = "r4_low";
const char* DBTabClassifierProduct::_R4_HI = "r4_hi";
const char* DBTabClassifierProduct::_R5_LOW = "r5_low";
const char* DBTabClassifierProduct::_R5_HI = "r5_hi";
const char* DBTabClassifierProduct::_R6_LOW = "r6_low";
const char* DBTabClassifierProduct::_R6_HI = "r6_hi";
const char* DBTabClassifierProduct::_R7_LOW = "r7_low";
const char* DBTabClassifierProduct::_R7_HI = "r7_hi";
const char* DBTabClassifierProduct::_R8_LOW = "r8_low";
const char* DBTabClassifierProduct::_R8_HI = "r8_hi";
const char* DBTabClassifierProduct::_R9_LOW = "r9_low";
const char* DBTabClassifierProduct::_R9_HI = "r9_hi";
const char* DBTabClassifierProduct::_R10_LOW = "r10_low";
const char* DBTabClassifierProduct::_R10_HI = "r10_hi";
const char* DBTabClassifierProduct::_R11_LOW = "r11_low";
const char* DBTabClassifierProduct::_R11_HI = "r11_hi";
const char* DBTabClassifierProduct::_R12_LOW = "r12_low";
const char* DBTabClassifierProduct::_R12_HI = "r12_hi";


const DBTabClassifierProduct::ColumnInfo DBTabClassifierProduct::mColumnTab[]=
{
    [INDEX_ID] = {DBTabClassifierProduct::_ID,"integer primary key AUTOINCREMENT"},
    [INDEX_NAME] ={DBTabClassifierProduct::_NAME,"varchar"},
    [INDEX_BARCODE] = {DBTabClassifierProduct::_BARCODE,"key varchar"},
    [INDEX_R1_LOW] = {DBTabClassifierProduct::_R1_LOW,"float"},
    [INDEX_R1_HI] = {DBTabClassifierProduct::_R1_HI,"float"},
    [INDEX_R2_LOW] = {DBTabClassifierProduct::_R2_LOW,"float"},
    [INDEX_R2_HI] = {DBTabClassifierProduct::_R2_HI,"float"},
    [INDEX_R3_LOW] = {DBTabClassifierProduct::_R3_LOW,"float"},
    [INDEX_R3_HI] = {DBTabClassifierProduct::_R3_HI,"float"},
    [INDEX_R4_LOW] = {DBTabClassifierProduct::_R4_LOW,"float"},
    [INDEX_R4_HI] = {DBTabClassifierProduct::_R4_HI,"float"},
    [INDEX_R5_LOW] = {DBTabClassifierProduct::_R5_LOW,"float"},
    [INDEX_R5_HI] = {DBTabClassifierProduct::_R5_HI,"float"},
    [INDEX_R6_LOW] = {DBTabClassifierProduct::_R6_LOW,"float"},
    [INDEX_R6_HI] = {DBTabClassifierProduct::_R6_HI,"float"},
    [INDEX_R7_LOW] = {DBTabClassifierProduct::_R7_LOW,"float"},
    [INDEX_R7_HI] = {DBTabClassifierProduct::_R7_HI,"float"},
    [INDEX_R8_LOW] = {DBTabClassifierProduct::_R8_LOW,"float"},
    [INDEX_R8_HI] = {DBTabClassifierProduct::_R8_HI,"float"},
    [INDEX_R9_LOW] = {DBTabClassifierProduct::_R9_LOW,"float"},
    [INDEX_R9_HI] = {DBTabClassifierProduct::_R9_HI,"float"},
    [INDEX_R10_LOW] = {DBTabClassifierProduct::_R10_LOW,"float"},
    [INDEX_R10_HI] = {DBTabClassifierProduct::_R10_HI,"float"},
    [INDEX_R11_LOW] = {DBTabClassifierProduct::_R11_LOW,"float"},
    [INDEX_R11_HI] = {DBTabClassifierProduct::_R11_HI,"float"},
    [INDEX_R12_LOW] = {DBTabClassifierProduct::_R12_LOW,"float"},
    [INDEX_R12_HI] = {DBTabClassifierProduct::_R12_HI,"float"},
    [INDEX_END] = {nullptr,nullptr}
};

DBTabClassifierProduct::DBTabClassifierProduct():DBTabBase(TAB_NAME)
{

}

const char *DBTabClassifierProduct::getColumnName(int index)
{
    if(index<INDEX_END){
        return mColumnTab[index].columnName;
    }
    return "";
}

void DBTabClassifierProduct::createTab(QSqlDatabase &db)
{
    DBTabBase::createTab(mTabName,mColumnTab,db);
}

